const app = getApp()
Page({
  data: {
    searchKeyword: "",
    repairList: []
  },
  onLoad() {
    this.getRepairList()

  },
  getRepairList() {
    app.axios('workOrder', {
      op: 'ajaxWooWxsmList'
    }).then(res => {
      res.lists.forEach(item => {
        item.info = app.parseJSONString(item.content)
        item.dateTime = app.dateFormatter(item.addtime, true)
      })
      this.setData({
        repairList: res.lists
      })
    })
  },
  onBack() {
    wx.navigateBack();
  },
  onInputChange(e) {
    this.setData({
      searchKeyword: e.detail.value,
    });
  },

  onPriceItemTap(e) {
    const id = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: "/pages/client/repair_price_info/index?id=" + id,
    });
  },

});
